<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:body>
	<ui:composition template="/templates/templateCRUD.xhtml">
		<ui:param name="tituloCadastro" value="Cadastro de Funcionários" />
		<ui:param name="tituloGrid" value="Lista de Funcionários" />
		<ui:param name="mbean" value="${funcionarioMB}" />
		<ui:define name="cadastro">
			<p:tabView>
				<p:tab title="Dados pessoais">
					<h:panelGrid columns="2">
						<h:outputText value="Nome:*" />
						<h:inputText value="#{mbean.bean.nome}" disabled="#{mbean.readOnly}" size="54" maxlength="50" />
						<h:outputText value="CPF:*" />
						<h:inputText value="#{mbean.bean.cpf}" disabled="#{mbean.readOnly}" size="54" maxlength="50" />
						<h:outputText value="RG:*" />
						<h:inputText value="#{mbean.bean.rg}" disabled="#{mbean.readOnly}" size="54" maxlength="50" />
					</h:panelGrid>
				</p:tab>
				
				<p:tab title="Dados de endereço">
				</p:tab>
					
			</p:tabView>
		</ui:define>

		<ui:define name="pesquisa">
			<h:panelGrid columns="2">
				<h:outputText value="Nome:" />
				<h:inputText value="#{mbean.beanSearch.nome}" size="54" maxlength="50" />
				<h:outputText value="CPF:" />
				<h:inputText value="#{mbean.beanSearch.cpf}" size="54" maxlength="50" />
			</h:panelGrid>
		</ui:define>
		
		<ui:define name="gridPesquisa">
			<p:column>
				<f:facet name="header">
					<h:outputText value="Nome"/>
				</f:facet>
				<h:outputText value="#{registro.nome}"/>
			</p:column>
			
			<p:column>
				<f:facet name="header">
					<h:outputText value="CPF"/>
				</f:facet>
				<h:outputText value="#{registro.cpf}"/>
			</p:column>
		</ui:define>
	</ui:composition>
</h:body>
</html>
